package iO.J20240415;

import java.io.File;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: nn
 * Date: 2025-05-06
 * Time: 下午5:14
 */
public class Demo3 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        //文件删除
        File f = new File("./test.txt");
        //f.delete();//根据 File 对象，删除该⽂件。成功删除后返回 true
        f.deleteOnExit();//根据 File 对象，标注⽂件将被删除，删除动作会到 JVM 运⾏结束时才会进行
        //把程序阻塞住
        scanner.next();
        System.out.println(f.exists());
    }
}
